package com.xiaoyu.im.data;

import com.xiaoyu.im.config.HttpConfig;
import com.xiaoyu.im.datamodel.MessagePayload;
import com.xiaoyu.base.event.NoReceiverJsonEvent;
import com.xiaoyu.base.net.RequestCreator;

public class IMData {

    public static void confirmSystemMessage(boolean confirm, MessagePayload.MessageAlertAction alertAction) {
        RequestCreator.create(new Object(), NoReceiverJsonEvent.class)
                .setRequestUrl(HttpConfig.UTIL_CONFIRM_SYSTEM_MESSAGE)
                .addPostData("confirm", confirm ? 1 : 0)
                .addPostData("key", alertAction.key)
                .addPostData("payload", alertAction.payload)
                .enqueue();
    }
}
